package com.bluesky.objectworld;

import java.util.Collection;
import java.util.List;


/**
 * An object not must be a instance of class. it can be without class reference.
 * but it has attributes and methods.
 * 
 * @author jack
 * 
 */
public interface _Object {
	long getId();

	void addAttribute(String type, String name);

	void removeAttribute(String name);

	Collection<Attribute> getAttributes();

	Object getAttributeValue(String name);

	void setAttributeValue(String name, Object value);

	void addMethod(String name, _Method method);

	void removeMethod(String name);

	Collection<_Method> getMethods();

	/**
	 * message handler, process message.
	 * 
	 * this is a very low level message handler, so it accept raw message parameters. but except for some basic objects, mostly are type of _Object.
	 * @param name
	 * @param parameters 
	 * @return
	 */
	_Object processMessage(String name, _Object... parameters);
	 
}
